class RedoMemberFields < ActiveRecord::Migration
  def self.up
    remove_column :members, :branch
    remove_column :members, :stored_committees
    remove_column :members, :stored_potential_committees
    remove_column :members, :stored_flex_points
    remove_column :members, :stored_potential_flex_points
    add_column :members, :dues_on_time, :tinyint, :default => 0
    add_column :members, :perfect_attendance, :boolean, :default => false
    add_column :members, :service_back_type, :tinyint
    add_column :members, :service_back_completed, :boolean, :default => false
    add_column :members, :office, :string
    add_column :members, :stored_total_hours, :tinyint, :default => 0
  end

  def self.down
    add_column :members, :branch, :string
    add_column :members, :stored_committees, :integer, :default => 0
    add_column :members, :stored_potential_committees, :integer, :default => 0
    add_column :members, :stored_flex_points, :float, :default => 0
    add_column :members, :stored_potential_flex_points, :float, :default => 0
    remove_column :members, :dues_on_time
    remove_column :members, :perfect_attendance
    remove_column :members, :service_back_type
    remove_column :members, :service_back_completed
    remove_column :members, :office
    remove_column :members, :stored_total_hours
  end
end
